/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aeronef.model;

import aeronef.builder.ProjectileBuilder;
import com.jme3.app.state.AppStateManager;
import com.jme3.asset.TextureKey;
import com.jme3.effect.ParticleEmitter;
import com.jme3.material.Material;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.shape.Sphere;
import com.jme3.texture.Texture;

/**
 *
 * @author Hagan
 */
public class Gun extends AeronefNode  {
    
    private Float muzzleVelocity;
    
    private ParticleEmitter flameEmitter;
    private ParticleEmitter smokeEmitter;
    private ProjectileBuilder projectileBuilder;
    
    public Float getMuzzleVelocity() { return muzzleVelocity; }
    public ParticleEmitter getFlameEmitter() { return flameEmitter; }
    public ParticleEmitter getSmokeEmitter() { return smokeEmitter; }
    
    
    public void setMuzzleVelocity(Float muzzleVelocity) { this.muzzleVelocity = muzzleVelocity; }
    public void setFlameEmitter(ParticleEmitter emitter) { this.flameEmitter = emitter; }
    public void setSmokeEmitter(ParticleEmitter emitter) { this.smokeEmitter = emitter; }
    
    public Gun(AppStateManager stateManager, ProjectileBuilder projectileBuilder) {
        super(stateManager);
        
        this.projectileBuilder = projectileBuilder;
    }
    
    public void shoot() {
        projectileBuilder.buildFromDefinition(this);
    }
    
}
